#ifndef _PLAYSTATE_H_
#define _PLAYSTATE_H_

#include "GameState.h"
#include "BlocksMatrix.h"
#include "GameFont.h"
#include "ComboControl.h"
#include "TextControl.h"

class CPlayState : public CGameState, 
				   public CMatrixEventsListener
{
public:
	~CPlayState();

	void OnKeyDown(UINT nChar);
	void Update(DWORD dwCurrentTime);
	void Draw();
	void OnStartRemoveLines();
	void OnLinesRemoved(int iLinesCount);
	void OnMatrixFull();

	void Reset();
	bool IsGameOver()  { return m_bGameOver; }

	static CPlayState* GetInstance(CStateManager* pManager);

protected:
	CPlayState(CStateManager* pManager);

private:
	CBlocksMatrix* m_pMatrix;
	
	CGameFont* m_pFont;

	CComboControl* m_pComboControl;

	
	CTextControl* m_pScoreControl;


	int m_iTotalLines;
	int m_iCurrentLevel;
	ULONG m_ulCurrentScore;

	bool m_bGameOver;


	TImagePtr m_pBackgroundImg;
};

#endif  